//
//  CirleAddView.swift
//  AirlineReservation
//
//  Created by Kevin on 2020/1/28.
//  Copyright © 2020 Kevin. All rights reserved.
//

import UIKit

class CirleAddView: UIView {
    
    // MARK: 回调
    public var complete:(() -> Void)?
    
    override func layoutSubviews() {
        let ui = UIButton(iconName: "button_add")
        ui.frame = CGRect(x: 0, y: 0, width: frame.width, height: frame.height)
        addSubview(ui)
        // 添加点击事件
        ui.addTarget(self, action: #selector(clickItem), for: .touchUpInside)
    }
    
    @objc func clickItem() -> Void {
        if let callback = complete {
            callback()
        }
    }
}
